<template>
	<div>
		<tabTitle title="下发记录"></tabTitle>
		<block v-for="(v,i) in list" :key="i">
			<div class="box">
				<div class="box_item flex align-items">
					<div class="label">
						下发时间:
					</div>
					<div class="value">
						{{v.issuedTime}}
					</div>
				</div>
				<div class="box_item flex align-items">
					<div class="label">
						时间:
					</div>
					<div class="value">
						{{v.startDate}}-{{v.endDate}}
					</div>
				</div>
				<div class="box_item flex align-items">
					<div class="label">
						督办类型:
					</div>
					<div class="value">
						{{v.handleTypeStr}}
					</div>
				</div>
				<div class="box_item flex align-items">
					<div class="label">
						督办周期:
					</div>
					<div class="value">
						{{handlePeriodStr.get(v.handlePeriod - 0)}}
					</div>
				</div>
				<div class="box_item flex align-items">
					<div class="label">
						督办人:
					</div>
					<div class="value">
						{{v.onusUserStr}}
					</div>
				</div>
				<div class="box_item flex align-items">
					<div class="label">
						工作任务:
					</div>
					<div class="value">
						{{v.workTasks}}
					</div>
				</div>
			</div>
		</block>
		
		<u-empty mode="list" v-if="list.length<=0" marginTop="80">
		</u-empty>
	</div>
</template>

<script>
	import tabTitle from '@/components/tabTitle.vue'
	import {
		getLssuedRecordList
	} from '@/api/supervise.js'
	import { handlePeriodStr,handleLevelStr} from '@/utils/newMap.js'
	
	export default {
		components: {
			tabTitle,
		},
		data() {
			return {
				handlePeriodStr,
				handleLevelStr,
				list: []
			}
		},
		onLoad(option) {
			this._getLssuedRecordList(option.id)
		},
		methods: {
			_getLssuedRecordList(id) {
				getLssuedRecordList({
					id,
					PAGE_NO: 1,
					PAGE_SIZE: 100000
				}).then(res => {
					this.list = res.rows
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #F6F6F6;
	}
</style>
<style lang="scss" scoped>
	.box:nth-child(1) {
		margin-top: 0;
	}

	.box {
		background-color: #FFF;
		padding: 20rpx 30rpx;
		margin-top: 30rpx;

		.box_item {
			margin-top: 20rpx;
		}

		.box_item:first-child {
			margin-top: 0rpx;
		}
	}
	.label{
		font-weight: 500;
		margin-right: 10rpx;
	}
</style>